package com.smart.community.work.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;

/**
 * 保洁任务详情视图对象
 * 
 * 严格按照《Java后端SpringBoot代码开发规范_重构版.md》VO规范实现：
 * - 使用@Data注解：自动生成getter/setter方法
 * - 完整注释：所有字段都有完整的JavaDoc注释
 * - 序列化支持：使用@JsonFormat注解格式化时间字段
 * - 字段命名：使用驼峰命名法
 * - 类型安全：使用具体的类型而不是Object
 * - 包含任务基本信息和执行记录信息
 * 
 * @author Wu.Liang
 * @since 2025-01-30
 * @version 1.0.0
 */
@Data
@Schema(description = "保洁任务详情视图对象")
public class CleaningTaskDetailVO {

    // ==================== 任务基本信息 ====================
    
    @Schema(description = "任务ID")
    private Long id;

    @Schema(description = "区域ID")
    private Long areaId;

    @Schema(description = "区域名称")
    private String areaName;

    @Schema(description = "区域类型")
    private String areaType;

    @Schema(description = "区域位置")
    private String areaLocation;

    @Schema(description = "保洁标准")
    private String cleaningStandard;

    @Schema(description = "任务名称")
    private String taskName;

    @Schema(description = "任务类型：routine-常规，temporary-临时，special-特殊")
    private String taskType;

    @Schema(description = "计划日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate scheduledDate;

    @Schema(description = "计划时间")
    @JsonFormat(pattern = "HH:mm")
    private LocalTime scheduledTime;

    @Schema(description = "分配用户ID")
    private Long assignedUserId;

    @Schema(description = "分配用户姓名")
    private String assignedUserName;

    @Schema(description = "分配用户真实姓名")
    private String assignedRealName;

    @Schema(description = "优先级：1-低，2-中，3-高，4-紧急")
    private Integer priority;

    @Schema(description = "状态：1-待分配，2-已分配，3-进行中，4-已完成，5-已取消")
    private Integer status;

    @Schema(description = "状态描述")
    private String statusDesc;

    @Schema(description = "任务描述")
    private String description;

    // ==================== 任务执行信息 ====================
    
    @Schema(description = "实际开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime actualStartTime;

    @Schema(description = "实际完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime actualEndTime;

    @Schema(description = "执行备注")
    private String executionNotes;

    // ==================== 执行记录信息 ====================
    
    @Schema(description = "执行记录列表")
    private List<CleaningRecordVO> records;

    @Schema(description = "清洁前照片列表")
    private List<String> beforePhotos;

    @Schema(description = "清洁后照片列表")
    private List<String> afterPhotos;

    @Schema(description = "使用工具列表")
    private List<String> toolsUsed;

    @Schema(description = "质量评分")
    private Double qualityScore;

    @Schema(description = "检查状态")
    private String inspectionStatus;

    @Schema(description = "检查备注")
    private String inspectionRemark;

    // ==================== 系统信息 ====================
    
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "更新人ID")
    private Long updateBy;

    @Schema(description = "物业公司ID")
    private Long propertyCompanyId;

    @Schema(description = "物业公司名称")
    private String propertyCompanyName;
}
